<?php
/********************************************************************************
* b0t auto twitt
* Simplified by lophliphluph for 2nd profile (http://twitter.com/herryuntitledz)
* Indonesia still Rock walopun terkadang suram!
*********************************************************************************/
if(!empty($_GET['x'])){
$status = $_GET['x'];
} else {

$quote = file("status.txt");
$isine = $kata[array_rand($quote)];
$statuse= $isine;

}

$f = fopen('count.txt', 'r'); //pada start awal, isi count dg angka 1
$i = fscanf($f, '%d');
$b = $i[0];

require 'tmhOAuth.php';
require 'tmhUtilities.php';
$tmhOAuth = new tmhOAuth(array(
  'consumer_key'    => '3DuYTPmMBa2S8VioBwctDA', // isi dengan consumer key
  'consumer_secret' => 'Rz5xs14HUnmfjubgLWfZ03LFxtqXspcK2rOEJQnnQ4', // isi dengan consumer secret
  'user_token'      => '98845061-Y1mRNdErKkoYRpGDSnv4LxBsYBXpZKsmxo64wPgh8', // isi dengan user token
  'user_secret'     => 'Z16Fz17ly2HJTS9lRncEk81OzZ0iB7rJMWsDh6lqsNo', // isi dengan user secret
));

$code = $tmhOAuth->request('POST', $tmhOAuth->url('1.1/statuses/update'), array(
  'status' => "$quote[$b]"
));

if ($code == 200) {
  tmhUtilities::pr(json_decode($tmhOAuth->response['response']));
} else {
  tmhUtilities::pr($tmhOAuth->response['response']);
}

$f = fopen('count.txt', 'r+' );
$count = fread($f, filesize('count.txt'));
rewind($f);
$count++;
fwrite($f, $count);
ftruncate($f, ftell($f));
fclose( $f );